# -*- coding: utf-8 -*-

"""order URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""

from django.conf.urls import url, include
from . import views


urlpatterns = [
    url(r'^$', views.home, name="home"),  # 主页
    url(r'^about$', views.about, name="about"),  # 关于我
    url(r'^message$', views.message, name="message"),  # 留言
    url(r'^links$', views.links, name="links"),  # 友情链接
    url(r'^archive/$', views.archive, name="archive"),  # 归档
    url(r'^search/$', views.blog_search, name="search"),  # 按文章标题搜索
    url(r'^article/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<id>\d+)/$', views.detail, name="detail"),  # 每篇文章
    url(r'^article/(?P<year>\d{4})/(?P<month>\d{1,2})/$', views.archive_month, name="archive_month"),  # 按月归档
    url(r'^articleClassfi/(?P<classfi>\w+)/$', views.classfiDetail, name="classfiDetail"),  # 每个分类页下面的文章
    url(r'^articleTag/(?P<tag>\w+)/$', views.tagDetail, name="tagDetail"),  # 每个标签页下面的文章
    url(r'^love/?$', views.love),
    url(r'^my-resume/?$', views.my_resume, name='my_resume'),  # 简历
    url(r'^create/messages$', views.create_messages, name='create_messages'),
    # url(r'^ueditor/', include('DjangoUeditor.urls')),
    url(r'^upload/$', views.upload_file, name='upload_file'),
]
